package com.liangtian.mdm.dm.config.model;

import com.liangtian.mdm.dm.attribute.model.Attribute;

import java.io.Serializable;

//@Table(name = "AM_ATTR_CONFIG")
public class AttrConfig extends Attribute implements Serializable, Comparable<AttrConfig> {

    private static final long serialVersionUID = 8077582444618841655L;
    private String id;             //主键id
    private Integer isShow;        //是否显示                  0-否 1-是
    private Integer showLength;    //字段在页面上的显示长度
    private Integer showOrder;        //显示顺序呢              列表显示顺序，多字段排序顺序
    private String showPage;    //1-列表、2-新增、3-修改、4-审核
    private Integer isNull;        //是否为空 		0-否 1-是
    private Integer isOrder;        //是否排序		0-否 1-是
    private Integer orderRule;        //排序规则   		1-asc 2-desc
    private String attrId;        //业务属性ID
    private String groupId;    //该属性展示的组
    private Integer groupOrder;    //该属性展示的组
    private String attrType;  //属性类型
    private String dataSourceTable;//数据来源表
    private String dataSourceColumn;//数据来源列
    private String moduleType;//组件类型
    private String codeRule;//编码规则
    private String waterCodeLength;//流水码长度
    private String cascadedAttr;//级联属性来源，父节点
    private String cascadedForeignKey;//关联属性外键
    private String selectedConfigAttr;//选择设置型：指定的绑定关系
    private Integer isTreeNode;// 是否作为树的节点显示
    private Integer setCodeTime;//配码规则：0-审核完成，1-数据录入
    private Integer isParentType;//是否创建父子关系树弹出框 0-否 ，1-是
    private String classColumn;//本模型与分类树模型关联的字段
    private String dataSourceShowColumn;//页面展示列（2016-10-09 刘晶添加）
    private String ruleType;//规则类型
    private String ruleTypeId;//校验规则ID
    private Integer isDefaultParentType;//是否是否默认父子级关系 0-否 ，1-是
    private String viewName;//视图名称
    private String treeViewColumn;//数据视图来源
    private String tabNoName;//外部选择数据表-表名
    private String groupName;//当前模型如果是多视图,当前属性所在试图的名称


    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getRuleType() {
        return ruleType;
    }

    public void setRuleType(String ruleType) {
        this.ruleType = ruleType;
    }

    public String getRuleTypeId() {
        return ruleTypeId;
    }

    public void setRuleTypeId(String ruleTypeId) {
        this.ruleTypeId = ruleTypeId;
    }

    private String isSeniorQuery;//是否作为高级查询
    private String queryType;//高级查询类型(左匹配、右匹配、全匹配...)

    public String getClassColumn() {
        return classColumn;
    }

    public void setClassColumn(String classColumn) {
        this.classColumn = classColumn;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Integer getShowLength() {
        return showLength;
    }

    public void setShowLength(Integer showLength) {
        this.showLength = showLength;
    }

    public Integer getShowOrder() {
        return showOrder;
    }

    public void setShowOrder(Integer showOrder) {
        this.showOrder = showOrder;
    }

    public String getShowPage() {
        return showPage;
    }

    public void setShowPage(String showPage) {
        this.showPage = showPage;
    }

    public Integer getIsNull() {
        return isNull;
    }

    public void setIsNull(Integer isNull) {
        this.isNull = isNull;
    }

    public Integer getIsOrder() {
        return isOrder;
    }

    public void setIsOrder(Integer isOrder) {
        this.isOrder = isOrder;
    }

    public Integer getOrderRule() {
        return orderRule;
    }

    public void setOrderRule(Integer orderRule) {
        this.orderRule = orderRule;
    }

    public String getAttrId() {
        return attrId;
    }

    public void setAttrId(String attrId) {
        this.attrId = attrId;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public Integer getGroupOrder() {
        return groupOrder;
    }

    public void setGroupOrder(Integer groupOrder) {
        this.groupOrder = groupOrder;
    }

    public String getAttrType() {
        return attrType;
    }

    public void setAttrType(String attrType) {
        this.attrType = attrType;
    }

    public String getDataSourceTable() {
        return dataSourceTable;
    }

    public void setDataSourceTable(String dataSourceTable) {
        this.dataSourceTable = dataSourceTable;
    }

    public String getDataSourceColumn() {
        return dataSourceColumn;
    }

    public void setDataSourceColumn(String dataSourceColumn) {
        this.dataSourceColumn = dataSourceColumn;
    }

    public String getModuleType() {
        return moduleType;
    }

    public void setModuleType(String moduleType) {
        this.moduleType = moduleType;
    }

    public String getCodeRule() {
        return codeRule;
    }

    public void setCodeRule(String codeRule) {
        this.codeRule = codeRule;
    }

    public String getWaterCodeLength() {
        return waterCodeLength;
    }

    public void setWaterCodeLength(String waterCodeLength) {
        this.waterCodeLength = waterCodeLength;
    }

    public String getCascadedAttr() {
        return cascadedAttr;
    }

    public void setCascadedAttr(String cascadedAttr) {
        this.cascadedAttr = cascadedAttr;
    }

    public String getCascadedForeignKey() {
        return cascadedForeignKey;
    }

    public void setCascadedForeignKey(String cascadedForeignKey) {
        this.cascadedForeignKey = cascadedForeignKey;
    }

    public String getSelectedConfigAttr() {
        return selectedConfigAttr;
    }

    public void setSelectedConfigAttr(String selectedConfigAttr) {
        this.selectedConfigAttr = selectedConfigAttr;
    }

    public Integer getIsTreeNode() {
        return isTreeNode;
    }

    public void setIsTreeNode(Integer isTreeNode) {
        this.isTreeNode = isTreeNode;
    }

    public Integer getSetCodeTime() {
        return setCodeTime;
    }

    public void setSetCodeTime(Integer setCodeTime) {
        this.setCodeTime = setCodeTime;
    }

    /**
     * @return the isParentType
     */
    public Integer getIsParentType() {
        return isParentType;
    }

    /**
     * @param isParentType the isParentType to set
     */
    public void setIsParentType(Integer isParentType) {
        this.isParentType = isParentType;
    }

    @Override
    public int compareTo(AttrConfig o) {
        return this.getShowOrder() - o.getShowOrder();
    }

    /**
     * @return the dataSourceShowColumn
     */
    public String getDataSourceShowColumn() {
        return dataSourceShowColumn;
    }

    /**
     * @param dataSourceShowColumn the dataSourceShowColumn to set
     */
    public void setDataSourceShowColumn(String dataSourceShowColumn) {
        this.dataSourceShowColumn = dataSourceShowColumn;
    }

    public String getIsSeniorQuery() {
        return isSeniorQuery;
    }

    public void setIsSeniorQuery(String isSeniorQuery) {
        this.isSeniorQuery = isSeniorQuery;
    }

    public String getQueryType() {
        return queryType;
    }

    public void setQueryType(String queryType) {
        this.queryType = queryType;
    }

    public Integer getIsDefaultParentType() {
        return isDefaultParentType;
    }

    public void setIsDefaultParentType(Integer isDefaultParentType) {
        this.isDefaultParentType = isDefaultParentType;
    }

    public String getViewName() {
        return viewName;
    }

    public void setViewName(String viewName) {
        this.viewName = viewName;
    }

    public String getTreeViewColumn() {
        return treeViewColumn;
    }

    public void setTreeViewColumn(String treeViewColumn) {
        this.treeViewColumn = treeViewColumn;
    }

    public String getTabNoName() {
        return tabNoName;
    }

    public void setTabNoName(String tabNoName) {
        this.tabNoName = tabNoName;
    }


}
